package main

import (
	"go-web/app/http/middlewares"
	"go-web/bootstrap"
	"go-web/pkg/database"
	"go-web/pkg/logger"
	"net/http"

	"github.com/gorilla/mux"
)

var router *mux.Router

func main() {
	database.Initialize()

	bootstrap.SetupDB()
	router = bootstrap.SetupRoute()

	err := http.ListenAndServe(":3001", middlewares.RemoveTrailingSlash(router))
	logger.LogError(err)
}
